package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Select;

import java.math.BigInteger;
import java.util.List;

public interface OrderDetailMapper {

    /**
     * 批量添加订单详情
     * @param orderDetailList
     */
    void addAll(List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单明细
     * @param orderId
     * @return
     */
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);

    /**
     * 查询订单详情信息
     * @return
     */
    @Select("select * from order_detail where order_id=#{orderId}")
    List<OrderDetail> selectOrderDetail(Long orderId);
}
